﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>replaceWith()方法应用示例</title>
    <script src="jquery.min.js">
    </script>
    <script>
        $(document).ready(function () {
            $("button").click(function () {
                $("p:first").replaceWith("Hello world!");
            });
        });
    </script>
</head>
<body>
    <p>孤帆远影碧空尽，</p>
    <p>唯见长江天际流。</p>
    <button>替换（replaceWith()方法）</button>
</body>
</html>